package com.aaa.stock.controller.api;

import com.aaa.entity.StockInventoryLog;
import com.aaa.stock.service.InventoryService;
import com.aaa.stock.vo.InvetoryVo;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/stock/api/inventory")
public class ApiInventoryControlle {
    @Autowired
    private InventoryService inventoryService;
    //分页查询
    @PostMapping("/list/{currentPage}/{pageSize}")
    public Result<IPage<StockInventoryLog>> list1(
            @PathVariable Integer currentPage,
            @PathVariable Integer pageSize,
            @RequestBody InvetoryVo invetoryVo
    ) {
        System.out.println("=== === " + currentPage);
        System.out.println("=== === " + pageSize);
        System.out.println("invetoryVo = " + invetoryVo);

        return inventoryService.getByPage(currentPage, pageSize,invetoryVo);
    }


}
